package org.tongdao.yulong.b_scope;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: TODO
 * @author: 殷玉龙
 * @date: 2021年01月11日 下午5:56
 */
@Configuration
@ComponentScan("org.tongdao.yulong.b_scope")
public class BeanScopeConfiguration {
  @Bean
  public Child child1(Toy toy) {
    Child child = new Child();
    child.setToy(toy);
    return child;
  }

  @Bean
  public Child child2(Toy toy) {
    Child child = new Child();
    child.setToy(toy);
    return child;
  }
}
